package com.test.spring.util.response;

/**
 * Created by ll on 2017/2/15.
 */
public enum ResponseMessageCode {
    OK(200, "OK"),
    DEFAULT_ERROR(1, "对不起，系统繁忙"),
    PARAMS_ERROR(2, "参数错误"),
    VALID_FAILED(3, "验证失败"),
    SUCCESS_CODE(200, "请求成功"),
    INVALID_SIGN(400, "签名校验失败"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    RPC_ERROR(501, "接口异常"),
    INTERNAL_SERVER_ERROR(500, "内部服务器错误");

    private final int code;
    private final String message;

    ResponseMessageCode(final int code, final String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
